import {animate, state, style, transition, trigger} from '@angular/animations';

export function widthSpread(start: string, end: string, timings: string, stateName = 'widthSpreadState') {
  return trigger(stateName, [
    state('start', style({width: start})),
    state('end', style({width: end})),
    transition('start <=> end', animate(timings))
  ]);
}

export function heightSpread(start: string, end: string, timings: string, stateName = 'heightSpreadState') {
  return trigger(stateName, [
    state('start', style({height: start})),
    state('end', style({height: end})),
    transition('start <=> end', animate(timings))
  ]);
}
